﻿using Se.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Se.Model.Data
{
    public class DataEntityCollection
    {
        /// <summary>
        /// 数据
        /// </summary>
        public Dictionary<long, DataEntityBase> EntitySet;

        /// <summary>
        /// 数据加载类型
        /// </summary>
        public DBLoadType LoadType { get; private set; }

        /// <summary>
        /// Entity的类名
        /// </summary>
        public string EntityFullName { get; private set; }

        public DataEntityCollection(DBLoadType loadType, string entityName)
        {
            this.LoadType = loadType;
            this.EntityFullName = entityName;
            this.EntitySet = new Dictionary<long, DataEntityBase>();
        }

        /// <summary>
        /// 添加Entity
        /// </summary>
        /// <param name="entity"></param>
        public void AddEntity(DataEntityBase entity)
        {
            this.EntitySet.Add(entity.ID, entity);
        }
    }
}
